package stdio.costa.imoca.servlet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Sample controller for going to the home page with a message
 */
@Controller
public class HomeController {

	private static final Logger logger = LoggerFactory.getLogger(HomeController.class);

	/**
	 * Selects the home page and populates the model with a message
	 */
	@RequestMapping(value = "/", method = RequestMethod.GET)
	public String home(Model model) {
		logger.info("Welcome home!");
		return "postcard";
	}
	
	@RequestMapping(value = "/login", method = RequestMethod.GET)
	public String login(Model model) {
		return "login";
	}
	
	@RequestMapping(value = "/register", method = RequestMethod.GET)
	public String register(Model model) {
		return "register";
	}
	
	@RequestMapping(value = "/image", method = RequestMethod.GET)
	public String image(Model model) {
		return "image";
	}
	
	@RequestMapping(value = "/doc", method = RequestMethod.GET)
	public String doc(Model model) {
		return "doc";
	}
	
	@RequestMapping(value = "/template", method = RequestMethod.GET)
	public String template(Model model) {
		return "template";
	}
	
	@RequestMapping(value = "/photo", method = RequestMethod.GET)
	public String photo(Model model) {
		return "photo";
	}
	
	@RequestMapping(value = "/wish", method = RequestMethod.GET)
	public String wish(Model model) {
		return "wish";
	}
	
	@RequestMapping(value = "/postmark", method = RequestMethod.GET)
	public String postmark(Model model) {
		return "postmark";
	}
	
	@RequestMapping(value = "/address", method = RequestMethod.GET)
	public String address(Model model) {
		return "address";
	}
	
	@RequestMapping(value = "/addReceiver", method = RequestMethod.GET)
	public String addReceiver(Model model) {
		return "add_receiver";
	}
	
	@RequestMapping(value = "/postcard/template", method = RequestMethod.GET)
	public String postcardTemplate(Model model) {
		return "postcard_template";
	}
	
	@RequestMapping(value = "/function_list", method = RequestMethod.GET)
	public String functionList(Model model) {
		return "function_list";
	}
	
	@RequestMapping(value = "/send_sms", method = RequestMethod.GET)
	public String sendSMS(Model model) {
		return "send_sms";
	}
	
	@RequestMapping(value = "/send_email", method = RequestMethod.GET)
	public String sendSmail(Model model) {
		return "send_email";
	}
	
	@RequestMapping(value = "/create_postcard_front", method = RequestMethod.GET)
	public String createPostcardFront(Model model) {
		return "create_postcard_front";
	}
	
	
	@RequestMapping(value = "/to_forget_password", method = RequestMethod.GET)
	public String toForgetPassword(Model model) {
		return "forget_password";
	}
}
